﻿namespace EFS.RC.Wallboard.Controls.Endpoints.Customer.SecondGroup
{
	/// <summary>
	/// Interaction logic for FirstGroup.xaml
	/// </summary>
	public partial class Main : System.Windows.Controls.UserControl
	{
		private EFS.RC.Wallboard.Common.Config.Sections.Phones.Profiles.Charts.CallStatistic profile = null;

		public Main()
		{
			InitializeComponent();
		}

		#region Properties
		/// Property PieSlicedImageSource: Set
		public System.Windows.Media.ImageSource PieSlicedImageSource
		{
			set
			{
				imagePieSliced.Source = value;
			}
		}

		/// Property Profile: Get, Set
		public EFS.RC.Wallboard.Common.Config.Sections.Phones.Profiles.Charts.CallStatistic Profile
		{
			get
			{
				return profile;
			}
			set
			{
				profile = value;
				controlSingleBarTotalCalls.Limit = new EFS.RC.Wallboard.Controls.Common.Charts.Bars.Limit(profile.Total);
				controlSingleBarAverageAnswer.Limit = new EFS.RC.Wallboard.Controls.Common.Charts.Bars.Limit(profile.AverageAnswerSeconds);
				controlSingleBarAbandon.Limit = new EFS.RC.Wallboard.Controls.Common.Charts.Bars.Limit(profile.Abandon);
			}
		}

		/// Property TotalCalls: Set
		public System.Int32 TotalCalls
		{
			set
			{
				controlSingleBarTotalCalls.CurrentValue = value;
			}
		}

		/// Property AverageAnswer: Set
		public System.TimeSpan AverageAnswer
		{
			set
			{
				controlSingleBarAverageAnswer.CurrentValue = value;
			}
		}

		/// Property Abandon: Set
		public System.Int32 Abandon
		{
			set
			{
				controlSingleBarAbandon.CurrentValue = value;
			}
		}
		#endregion

		private void UserControl_Loaded(object sender, System.Windows.RoutedEventArgs e)
		{
			if (!System.ComponentModel.DesignerProperties.GetIsInDesignMode(this))
			{	
			}
		}
	}

}